const path =require('path')

module.exports = {
  devServer: {
    port: 8080,
    open: true,
    proxy: {
      '/hala': {
        target: ' https://mock.mengxuegu.com/mock/6183bc0d397f204c757a3bc7',
        changeOrigin: true,
        pathRewrite: {
          '^/hala': '/hala'
        }
      }
    }
  },
  webpack: {
    //配置路径别名
    alias: {
      '_': path.join(__dirname, 'src'),
      '_components': path.join(__dirname, 'src/components'),
      '_pages': path.join(__dirname, 'src/pages'),
      '_routes': path.join(__dirname, 'src/routes'),
      '_utils': path.join(__dirname, 'src/utils'),
      '_assets': path.join(__dirname, 'src/assets'),
      '_api': path.join(__dirname, 'src/api')
    }
  }
}